package com.jlpay.openapi.demo.ledger.merchconf;

import com.jlpay.open.jlpay.sdk.java.model.ledger.request.MerchRevBindQueryRequest;
import com.jlpay.open.jlpay.sdk.java.model.ledger.response.MerchRevBindQueryResponse;
import com.jlpay.open.jlpay.sdk.java.utils.json.JsonUtils;
import com.jlpay.openapi.demo.JlpayOpenApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author dengwenning
 * @since 2024/8/30
 **/
public class MerchRevBindQueryService {

    private static final Logger LOGGER = LoggerFactory.getLogger(MerchRevBindQueryService.class);

    public static void main(String[] args) {
        MerchRevBindQueryRequest merchRevBindQueryRequest = buildMerchRevBindQueryRequest();
        MerchRevBindQueryResponse merchIssueUpdateResponse = JlpayOpenApiService.openMerchService()
                .post(merchRevBindQueryRequest, MerchRevBindQueryResponse.class);
        LOGGER.info("分账配置分账业务信息变更响应:{}", JsonUtils.toString(merchIssueUpdateResponse));
    }

    private static MerchRevBindQueryRequest buildMerchRevBindQueryRequest() {
        MerchRevBindQueryRequest merchRevBindQueryRequest = new MerchRevBindQueryRequest();
        merchRevBindQueryRequest.setOrgCode("50720711");
        merchRevBindQueryRequest.setMchId("849581183510017");
        merchRevBindQueryRequest.setRevMchId("849602058120001");
        return merchRevBindQueryRequest;
    }
}
